<style>
.ncap-account-container-list { font-size: 0; *word-spacing:-1px/*IE6銆�7*/;
vertical-align: top; display: inline-block; *display: inline/*IE7*/;
width: 80%; padding-left: 1%; *zoom: 1;
}
.ncap-account-container-list li { font-size: 13px; line-height: 20px; color: #999; vertical-align: top; letter-spacing: normal; word-spacing: normal; display: inline-block; *display: inline/*IE7*/;
padding-right: 30px; height: 25px; margin-bottom: 5px; *zoom: 1;
}
.checkbox {
    display: unset;
}
.lab{
	position:relative;
	top:0px;
	left: 5px;
	color: #000000;
}
</style>
<form method="post" action="/oss/?r=channel/doEdit">
    <{include file='../common_params.tpl'}>
    <input type="hidden" name="id" value="<{$info.id}>" />

    <div class="box box-black">
        <div class="box-body">
            <table class="table table-bordered">
                <colgroup>
                    <col style="width: 20%;"></col>
                    <col style="width: 80%;"></col>
                </colgroup>
                
                <tr>
                    <th class="th-label">渠道名称</th>
                    <td>
                        <input type="text" name="channel_name" class="form-control inline" value="<{$info.channel_name}>" placeholder="" />
                    </td>
                </tr>
                
                <tr>
                    <th class="th-label">渠道ID</th>
                    <td>
                        <input type="text" name="tab" class="form-control inline" value="<{$info.tab}>" placeholder="" />
                    </td>
                </tr>
                
                <tr>
                    <th class="th-label">所属专服</th>
                    <input type="hidden" name="old_special_id" value="<{$info.special_id}>" />
                    <td>
                        <div>
                        	<h5>
								<label><{$item.channel_name}></label>
								<input id="cls_full" type="checkbox">
								<label>全部</label>
							</h5>
                        	
                        	<ul class="ncap-account-container-list" id="">
                        		<{foreach from=$specialList item=item key=key}>
                        		<li><input class="checkbox" name="special_id[]" value="<{$key}>" <{if in_array($key,$special_ids_array) }>checked<{/if}> type="checkbox"><span class="lab"><{$item}></span></li>
                        		<{/foreach}>
							</ul>
                        </div>
                    </td>
                </tr>
                
                <!--<tr>
                    <th class="th-label">所属专服</th>
                    <td>
                    	<input type="hidden" name="old_special_id" value="<{$info.special_id}>" />
                        <select class="form-control inline" name="special_id">
                        	<{foreach from=$specialList item=item key=key}>
                        		<option value="<{$key}>" <{if $info.special_id == $key }>selected<{/if}> ><{$item}></option>
                        	<{/foreach}>
                        </select>
                    </td>
                </tr>-->
                
                <tr>
                    <th class="th-label">专服ID</th>
                    <td>
                        <input type="text" name="game_id" class="form-control inline" value="<{$info.game_id}>" placeholder="" />
                    </td>
                </tr>
                
                <tr>
                    <th class="th-label">版本号</th>
                    <td>
                        <input type="text" name="version" class="form-control inline" value="<{$info.version}>" placeholder="" />
                    </td>
                </tr>
                
                <tr>
                    <th class="th-label">app更新地址</th>
                    <td>
                        <input type="text" name="app_address" class="form-control inline" value="<{$info.app_address}>" placeholder="" />
                    </td>
                </tr>
                
                <tr>
                    <th class="th-label">充值KEY</th>
                    <td>
                        <input type="text" name="recharge_key" class="form-control inline" value="<{$info.recharge_key}>" placeholder="" />
                    </td>
                </tr>
                
                <tr>
                    <th class="th-label-s">强制更新</th>
                    <td>
                        <label><input type="radio" name="is_force"  value="0" <{if $info.is_force == 0 }>checked<{/if}> />否</label>
                        <label><input type="radio" name="is_force"  value="1" <{if $info.is_force == 1 }>checked<{/if}> />是</label>
                    </td>
                </tr>
                
                <tr>
                    <th class="th-label-s">充值开启</th>
                    <td>
                        <label><input type="radio" name="is_open"  value="0" <{if $info.is_open == 0 }>checked<{/if}> />否</label>
                        <label><input type="radio" name="is_open"  value="1" <{if $info.is_open == 1 }>checked<{/if}> />是</label>
                    </td>
                </tr>
                
                <tr>
                    <th class="th-label">ios审核</th>
                    <td>
                        <input type="text" name="ios_verify" class="form-control inline" value="<{$info.ios_verify}>" placeholder="" />
                    </td>
                </tr>


            </table>
        </div>

        <div class="box-footer">
            <a href="<{$backUrl}>" class="btn btn-default">返回</a>
            <button type="submit" name="sub" class="btn btn-default pull-right">保存</button>
            <input type="hidden" name="page" value="<{$page}>" />
        </div>
    </div>
</form>

<script type="text/javascript">
    $(function(){
    	$('button[name="sub"]').click(function(){
        	var channel_name = $('input[name="channel_name"]').val();
        	if(channel_name == ''){
        		layer.alert('请填写渠道名称', {icon: 2, skin: 'layui-layer-molv'});
            	return false;
        	}
        	
        	var tab = $('input[name="tab"]').val();
        	if(tab == ''){
        		layer.alert('请填写渠道代码', {icon: 2, skin: 'layui-layer-molv'});
            	return false;
        	}
        	
        	var arr = new Array();
            $("input[name='special_id[]']:checkbox[checked]").each(function(i){
                arr[i] = $(this).val();
            });
            var special = arr.join(",");
            if(special == ''){
        	    layer.msg('请选择专服', {icon: 2,time: 2000});
        	    return false;
            }
            
            
        });
    });
    
    $('#cls_full').on('ifChecked', function(event){
   	        $(':checkbox').iCheck('check');
        });
   
        $('#cls_full').on('ifUnchecked', function(event){
   	        $(':checkbox[name="special_id[]"]').iCheck('uncheck');
        });
</script>